#ifndef SIMPLE_SUPPORT_META_RECONSTRUCT_HPP
#define SIMPLE_SUPPORT_META_RECONSTRUCT_HPP

#include <type_traits> // std::false_type

#include "list.hpp" // list_constructor
#include "bind.hpp" // bind
#include "find.hpp" // find_t
#include "pend.hpp" // concat_t

namespace simple::support::meta
{

	template <typename Result, typename Op, typename T>
	struct reconstruct_find_adapter : std::false_type
	{
		using binding = concat_t<Result, typename Op::template bound<T>::type>;
	};

	template <typename List, template <typename...> typename Operator>
	using reconstruct_t = typename find_t
	<
		bind<reconstruct_find_adapter, typename list_constructor<List>::template function<>,
			bind<Operator>>,
		List
	>::functor::binding;

} // namespace simple::support::meta

#endif /* end of include guard */
